home *** CD-ROM | disk | FTP | other *** search
- #include <proto/exec.h>
- #include <proto/dos.h>
- #include <proto/wb.h>
- #include <proto/intuition.h>
-
- struct ExecBase *SysBase;
- struct DosLibrary *DOSBase;
- struct Library *WorkbenchBase;
- struct IntuitionBase *IntuitionBase;
-
- main(void)
- {
- struct RDArgs *rda;
- struct Screen *s;
- BPTR l;
- static char *fn,*fp,t;
-
- SysBase=*(struct ExecBase **)4L;
-
- if(DOSBase=(struct DosLibrary *)OpenLibrary("dos.library",0L)) {
- if(WorkbenchBase=OpenLibrary("workbench.library",0L)) {
- if(IntuitionBase=(struct IntuitionBase *)OpenLibrary("intuition.library",0L)) {
- if(rda=ReadArgs("FILENAME",(LONG *)&fn,NULL)) {
- fp=FilePart(fn);
- t=*fp; *fp='\0';
- if(l=Lock(fn,ACCESS_READ)) {
- if(s=LockPubScreen(NULL)) {
- *fp=t;
- WBInfo(l,fp,s);
- UnlockPubScreen(NULL,s);
- }
- UnLock(l);
- }
- }
- CloseLibrary((struct Library *)IntuitionBase);
- }
- CloseLibrary(WorkbenchBase);
- }
- CloseLibrary((struct Library *)DOSBase);
- }
- }
-